<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<title>素材库</title>
	<link rel="stylesheet" href="/layui/css/layui.css">
	<style type="text/css">
		html{

		}
		body{
			background: #f0f2f5;
		}
		/*header*/
		.material_container{
			margin: 16px;
			border: 1px solid #ebebeb;
		}
		.material_header_container{
			background: #fff;
		}
		.material_headerList_container{
			padding: 0 24px;
			font-size: 14px;
			color: rgba(0,0,0,.65);
			height: 43px;
			border-bottom: 1px solid #ebebeb;
		}
		.material_headerList_container li{
			position: relative;
			display: inline-block;
			-webkit-box-sizing: border-box;
			box-sizing: border-box;
			height: 100%;
			margin: 0 18px 0 0;
			padding: 12px 16px;
			text-decoration: none;
			cursor: pointer;
			-webkit-transition: color .3s cubic-bezier(.645,.045,.355,1);
			transition: color .3s cubic-bezier(.645,.045,.355,1);
			border-bottom: 2px solid #fff;
			font-size: 14px;
			color: rgba(0,0,0,.65);
		}
		.material_headerList_Active{
			color: #1890ff !important;
			font-weight: 500;
			border-bottom: 2px solid #1890ff !important;
		}
		.material_articleMain_container{
			background: #fff;
			padding-bottom: 20px;
		}
		/*tabs*/
		.material_mainTabs_container{
			padding: 15px 24px 0 24px;
		}
		.material_mainTabs_content{
			display: flex;
			align-items: center;
		}
		.material_mainTabsList_container{

		}
		.material_mainTabsList_container li{
			border-right: none;
			border-radius: 5px;
			border-color: #1590ff;
			background: #1890ff;
			color: #fff;
			padding: 0 16px;
			height: 34px;
			font-size: 14px;
			width: 117px;
			text-align: center;
			line-height: 34px;
		}
		.material_mainTabsTips_container{
			display: flex;
			align-items: center;
			padding: 8px 16px;
			background: #effaff;
			border-radius: 2px;
			margin-left: 12px;
			font-size: 13px;
			color: rgba(0,0,0,.44);
			line-height: 17px;
		}
		.material_mainTabsTips_container svg{
			width: 18px;
			height: 18px;
			margin-right: 2px;
		}
		.material_mainTabsTips_container p{

		}
		/*main*/
		.material_main_container{

		}
		/*没数据*/
		.material_mainNoData_container{
			display: flex;
			flex-direction: column;
			justify-content: center;
			align-items: center;
			padding: 60px 0;	
		}
		.material_mainNoData_container svg{

		}
		.material_mainNoData_container p{
			font-size: 14px;
			color: rgba(0,0,0,.45);
			margin: 16px 0;
		}
		.material_mainNoData_container button{
			width: 132px;
			height: 36px;
			border-radius: 2px;
			color: #fff;
			background-color: #1890ff;
			border-color: #1890ff;
			text-shadow: 0 -1px 0 rgba(0,0,0,.12);
			-webkit-box-shadow: 0 2px 0 rgba(0,0,0,.045);
			box-shadow: 0 2px 0 rgba(0,0,0,.045);
			appearance: none;
			outline: none;
			border-style: solid;
			cursor: pointer;
		}
		/*有数据*/
		.material_main_content{

		}
		/*筛选部分*/
		.material_mainOther_container{
			display: flex;
			align-items: center;
			justify-content: space-between;
			padding: 0 24px;
			margin: 16px 0;
		}
		.material_mainOtherLeft_container{
			display: flex;
			align-items: center;
		}
		.material_mainOtherLeft_container span{
			font-size: 14px;
			color: rgba(0,0,0,.65);
			line-height: 28px;
		}
		.material_mainOtherLeft_container form{
			width: 215px;
		}
		.material_mainOtherLeft_container form select{
			
		}
		.material_mainOtherLeft_container b{
			font-size: 14px;
			color: rgba(0,0,0,.65);
			line-height: 28px;
			font-weight: 400;
			color: #1990ff;
			margin-left: 10px;
			cursor: pointer;
		}
		.material_mainOtherRight_container{
			display: flex;
			align-items: center;
		}
		.material_mainOtherRight_container span{
			color: rgba(0,0,0,.65);
			font-size: 14px;
		}
		.material_mainOtherRight_container button{
			border: 1px solid #1990ff;
			color: #1990ff;
			background: #fff;
			margin-left: 16px;
			height: 32px;
			padding: 0 15px;
			font-size: 14px;
			cursor: pointer;
		}
		/*内容列表部分*/
		.material_article_container{
			padding: 0 24px;
			margin: 16px 0 0 0;
		}
		.material_articleTitle_container{
			display: flex;
			align-items: center;
			margin-bottom: 16px;
		}
		.material_articleTitle_container h4{
			flex:1;
			font-size: 16px;
			color: rgba(0,0,0,.85);
			line-height: 22px;
			font-weight: bold;
		}
		.material_articleTitleSearch_container{
			display: flex;
			align-items: center;
			border: 1px solid #d9d9d9;
			height: 32px;
			padding: 4px 11px;
			color: rgba(0,0,0,.65);
			font-size: 14px;
			border-radius: 4px;
			box-sizing: border-box;
		}
		.material_articleTitleSearch_container input{
			outline: none;
			appearance: none;
			border: none;
			font-size: 14px;
			color: rgba(0,0,0,.65);
			flex:1;
		}
		.material_articleTitleSearch_container svg{
			cursor: pointer;
		}
		/*文章素材列表*/
		.material_articleList_container{
			display: flex;
			align-items: center;
			flex-wrap: wrap;
		}
		.material_articleList_container li{
			width: 260px;
			background: #f9f9f9;
			border-radius: 4px;
			padding: 4px 4px 0;
			margin: 0 11px 16px 0;
			box-sizing: border-box;
		}
		
		.material_articleListInfo_container{
			background: #fff;
			border-radius: 4px;
			border: 1px solid #f0f0f0;
			position: relative;
			padding: 16px 16px 12px;
		}
		.material_articleList_container a{
			
		}
		.material_articleListInfo_container a h3{
			font-size: 14px;
			font-weight: 700;
			color: rgba(0,0,0,.85);
			line-height: 20px;
			max-width: 226px;
			margin-bottom: 9px;
			display: block;
			overflow: hidden;
			text-overflow: ellipsis;
			white-space: nowrap;
			word-break: break-all;
		}
		.material_articleListInfo_content{
			display: flex;
			justify-content: space-between;
			align-items: flex-start;
		}
		.material_articleListInfo_content p{
			width: 166px;
			font-size: 13px;
			color: rgba(0,0,0,.65);
			line-height: 18px;
			overflow: hidden;
			text-overflow: ellipsis;
			display: -webkit-box;
			-webkit-line-clamp: 2;
			-webkit-box-orient: vertical;
			word-break: break-all;
			white-space: pre-wrap;
		}
		.material_articleListInfo_content img{
			width: 48px;
			height: 48px;
			border-radius: 2px;
			-o-object-fit: cover;
			object-fit: cover;
		}
		.material_articleListOther_container{
			font-size: 13px;
			color: rgba(0,0,0,.45);
			line-height: 18px;
			padding: 8px 6px 9px;
			display: flex;
			justify-content: space-between;
			align-items: center;
		}
		.material_articleListOther_container span{
			font-size: 13px;
			color: rgba(0,0,0,.45);
		}
		.material_articleListOther_container svg{
			width: 16px;
			height: 16px;
			cursor: pointer;
		}
	</style>
</head>
<body>
	<div class="material_container">
		<!-- header（导航） -->
		<div class="material_header_container">
			<ul class="material_headerList_container">
				<li class="material_headerList_Active">文章</li>
				<!-- <li>链接</li>
					<li>海报</li> -->
				</ul>
			</div>
			<div class="material_articleMain_container">
				<!-- tabs(公众号文章素材这一部分) -->
				<div class="material_mainTabs_container">
					<div class="material_mainTabs_content">
						<ul class="material_mainTabsList_container">
							<li>公众号文章素材</li>
							<!-- <li>微伴文章素材</li> -->
						</ul>
						<div class="material_mainTabsTips_container">
							<svg t="1611650419506" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3460" width="12" height="12"><path d="M797.4 725.4l-54.2-45.9V436.6c0-61.6-24-119.6-67.6-163.2-36.3-36.3-82.6-59-132.7-65.6v-19.2c0-16.6-13.4-30-30-30s-30 13.4-30 30v19.1c-50.4 6.4-97 29.2-133.6 65.7-43.6 43.6-67.6 101.5-67.6 163.2v242.8l-54.9 45.9c-9.7 8.1-13.3 21.4-9 33.3s15.6 19.8 28.2 19.8h170.7c4.4 48.7 45.4 87.1 95.3 87.1s90.9-38.3 95.3-87.1H778c12.6 0 23.8-7.9 28.2-19.7s0.8-25.2-8.8-33.3z m-285.4 80c-16.7 0-30.8-11.6-34.6-27.1h69.2c-3.8 15.5-17.9 27.1-34.6 27.1z" fill="#1990ff" p-id="3461"></path></svg>
							<p>可同步公众号素材库文章素材（已发送的素材无法同步阅读数、评论等数据）</p>
						</div>
					</div>
				</div>
				<!-- main -->
				<div class="material_main_container">
					<!-- 没数据 -->
					{if $count<1}
					<div class="material_mainNoData_container">
						<svg t="1611651032740" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7145" width="100" height="100"><path d="M831.7 369.4H193.6L64 602v290.3h897.2V602L831.7 369.4zM626.6 604.6c0 62.9-51 113.9-114 113.9s-114-51-114-113.9H117.5l103.8-198h582.5l103.8 198h-281zM502.2 131h39.1v140.6h-39.1zM236.855 200.802l27.647-27.647 99.419 99.418-27.648 27.648zM667.547 272.637l99.418-99.419 27.648 27.648-99.418 99.418z" p-id="7146" fill="#cdcdcd"></path></svg>
						<p>暂无文章素材</p>
						<p style="margin-bottom: 24px;">可添加公众号，同步公众号文章素材</p>
						<button onclick="popupSubscriptionFun()">添加公众号</button>
					</div>
					{/if}
					<!-- 有数据 --> 
					{if $count>0}
					<div class="material_main_content">
						<!-- 筛选部分 -->
						<div class="material_mainOther_container">
							<div class="material_mainOtherLeft_container">
								<span>公众号筛选：</span>
								<form class="layui-form">
									<select name="gzhSelect" lay-verify="gzhSelect" lay-filter="gzhSelect" id="gzhSelect">
										{if $user}
										<!-- <option value="{$user->authorizer_appid}">{$user->message->authorizer_info->nick_name}</option> -->
										<option value="{$user->authorizer_appid}">{$user->message["authorizer_info"]["nick_name"]}</option>
										{/if}
										{loop $list as $lists}
											{if $lists->authorizer_appid != $user->authorizer_appid}
											<option value="{$lists->authorizer_appid}">{$lists->message->authorizer_info->nick_name}</option>
											{/if}
										{/loop}
									</select>
								</form>
								<b onclick="popupSubscriptionFun()">+ 添加公众号</b>
							</div>
							<div class="material_mainOtherRight_container">
								<span>上次同步时间：{if $user->update_time}{$user->update_time}{else if $max}{$max}{else}暂无同步记录{/if}</span>
								<button onclick="synchronization()">同步</button>
							</div>
						</div> 
						<!-- 内容列表部分 -->
						{if count($article_list)>0}
						<div class="material_article_container">
							<div class="material_articleTitle_container">
								<h4>文章素材（共<span id="con">{count($article_list)}</span>篇）</h4>
								<div class="material_articleTitleSearch_container">
									<input type="text" name="" placeholder="请输入文章标题">
									<svg t="1611651745720" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8093" width="15" height="15"><path d="M450.540923 835.421849C238.095329 835.421849 65.258028 662.585911 65.258028 450.14713 65.258028 237.711074 238.095329 64.873772 450.540923 64.873772 662.986518 64.873772 835.830632 237.711074 835.830632 450.14713 835.830632 662.584548 662.986518 835.421849 450.540923 835.421849L450.540923 835.421849ZM450.540923 159.705847C290.384053 159.705847 160.09419 289.998435 160.09419 450.14713 160.09419 610.297187 290.384053 740.591138 450.540923 740.591138 610.696431 740.591138 740.99447 610.297187 740.99447 450.14713 740.99447 289.998435 610.696431 159.705847 450.540923 159.705847L450.540923 159.705847Z" p-id="8094" fill="#d9d9d9"></path><path d="M900.538167 958.477626C885.598531 958.477626 870.668434 952.777836 859.268854 941.387795L657.978933 740.112862C635.189312 717.323242 635.189312 680.372035 657.978933 657.576963 680.77673 634.794156 717.722486 634.794156 740.518919 657.576963L941.807478 858.851896C964.598462 881.641517 964.598462 918.592724 941.807478 941.386432 930.407899 952.777836 915.477801 958.477626 900.538167 958.477626" p-id="8095" fill="#d9d9d9"></path></svg>
								</div>
							</div>
							<!-- 文章素材列表 -->
							<ul class="material_articleList_container">
								<!-- 循环列表 -->
								{loop $article_list as $listv}
								<li>
									<div class="material_articleListInfo_container">
										<a href="{$listv->url}" target="_blank">
											<h3>{$listv->title}</h3>
											<div class="material_articleListInfo_content">
												<p>{$listv->digest}</p>
												<img src="{$listv->thumb_url?$listv->thumb_url:$image}">
											</div>
										</a>
									</div>
									<div class="material_articleListOther_container">
										<span>更新时间：{$listv->update_time}</span>
										<svg onclick="refreshMaterialFun('{$listv->media_id}')" t="1611652638004" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9057" width="19" height="19"><path d="M943.8 484.1c-17.5-13.7-42.8-10.7-56.6 6.8-5.7 7.3-8.5 15.8-8.6 24.4h-0.4c-0.6 78.3-26.1 157-78 223.3-124.9 159.2-356 187.1-515.2 62.3-31.7-24.9-58.2-54-79.3-85.9h77.1c22.4 0 40.7-18.3 40.7-40.7v-3c0-22.4-18.3-40.7-40.7-40.7H105.5c-22.4 0-40.7 18.3-40.7 40.7v177.3c0 22.4 18.3 40.7 40.7 40.7h3c22.4 0 40.7-18.3 40.7-40.7v-73.1c24.2 33.3 53 63.1 86 89 47.6 37.3 101 64.2 158.9 79.9 55.9 15.2 113.5 19.3 171.2 12.3 57.7-7 112.7-24.7 163.3-52.8 52.5-29 98-67.9 135.3-115.4 37.3-47.6 64.2-101 79.9-158.9 10.2-37.6 15.4-76 15.6-114.6h-0.1c-0.3-11.6-5.5-23.1-15.5-30.9zM918.7 135.2h-3c-22.4 0-40.7 18.3-40.7 40.7V249c-24.2-33.3-53-63.1-86-89-47.6-37.3-101-64.2-158.9-79.9-55.9-15.2-113.5-19.3-171.2-12.3-57.7 7-112.7 24.7-163.3 52.8-52.5 29-98 67.9-135.3 115.4-37.3 47.5-64.2 101-79.9 158.8-10.2 37.6-15.4 76-15.6 114.6h0.1c0.2 11.7 5.5 23.2 15.4 30.9 17.5 13.7 42.8 10.7 56.6-6.8 5.7-7.3 8.5-15.8 8.6-24.4h0.4c0.6-78.3 26.1-157 78-223.3 124.9-159.2 356-187.1 515.2-62.3 31.7 24.9 58.2 54 79.3 85.9h-77.1c-22.4 0-40.7 18.3-40.7 40.7v3c0 22.4 18.3 40.7 40.7 40.7h177.3c22.4 0 40.7-18.3 40.7-40.7V175.8c0.1-22.3-18.2-40.6-40.6-40.6z" p-id="9058" fill="#898989"></path></svg>
									</div>
								</li>
								{/loop}
							</ul>
						</div>
						{else}
							<div class="material_mainNoData_container">
								<svg t="1611651032740" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7145" width="100" height="100"><path d="M831.7 369.4H193.6L64 602v290.3h897.2V602L831.7 369.4zM626.6 604.6c0 62.9-51 113.9-114 113.9s-114-51-114-113.9H117.5l103.8-198h582.5l103.8 198h-281zM502.2 131h39.1v140.6h-39.1zM236.855 200.802l27.647-27.647 99.419 99.418-27.648 27.648zM667.547 272.637l99.418-99.419 27.648 27.648-99.418 99.418z" p-id="7146" fill="#cdcdcd"></path></svg>
								<p>您选择的公众号暂无文章素材</p>
							</div>
						{/if}
					</div>
					{/if}
				</div>
			</div>
		</div>
	<script src="/cdn/jquery.js"></script>
	<script src="/layui/layui.js"></script>
	<script type="text/javascript">
		layui.use('form', function(){
			var form = layui.form;

			//监听提交
			form.on('submit(formDemo)', function(data){
				layer.msg(JSON.stringify(data.field));
				return false;
			});
			// 改变下拉框事件
			form.on('select(gzhSelect)', function (data) {
				var appid = $("#gzhSelect").val();
				if("{$user->authorizer_appid}" == appid){
					return false;
				}
				window.location.href = "authorizer_one.html?authorizer_appid="+appid;
                form.render('select');//select是固定写法 不是选择器
        	});
		});
	</script>
	<script src="/js/ajax.js"></script>
	<script type="text/javascript">
		// 点击搜索按钮
		$('.material_articleTitleSearch_container svg').click(function(){
			if(!$(this).prev().val()){
				layer.open({
				  title: '提示',
				  content: '不能为空'
				}); 
				return false;
			}
			var title = $(this).prev().val();
			var url = window.location.search;
			var appid = $("#gzhSelect").val();
			if(url == ""){
				myAjaxPost(false, true, 'authorizer_list.html', { title:title}, function (resp) {
					if(resp.status == "success"){
						data = resp.data[0];
						if(data == ""){
							alert("未搜索到");
							return false;
						}
						var html = "";
						var image = resp.data[2];
						data.forEach(function(text) {
							if(text.digest){
								var digest = text.digest;
							}else{
								digest = "";
							}
							if(!text.thumb_url){
								var thumb_url = image;
							}else{
								var thumb_url = text.thumb_url;
							}
							html += '<li>';
							html += '<div class="material_articleListInfo_container">';
							html += '<a href="'+text.url+'" target="_blank">';
							html += '<h3>'+text.title+'</h3>';
							html += '<div class="material_articleListInfo_content">';
							html += '<p>'+digest+'</p>';
							html += '<img src="'+thumb_url+'">';
							html += '</div>';
							html += '</a>';
							html += '</div>';
							html += '<div class="material_articleListOther_container">';
							html += '<span>最后同步时间：'+text.updates_time+'</span>';
							html += '<svg onclick="refreshMaterialFun('+text.media_id+')" t="1611652638004" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9057" width="19" height="19"><path d="M943.8 484.1c-17.5-13.7-42.8-10.7-56.6 6.8-5.7 7.3-8.5 15.8-8.6 24.4h-0.4c-0.6 78.3-26.1 157-78 223.3-124.9 159.2-356 187.1-515.2 62.3-31.7-24.9-58.2-54-79.3-85.9h77.1c22.4 0 40.7-18.3 40.7-40.7v-3c0-22.4-18.3-40.7-40.7-40.7H105.5c-22.4 0-40.7 18.3-40.7 40.7v177.3c0 22.4 18.3 40.7 40.7 40.7h3c22.4 0 40.7-18.3 40.7-40.7v-73.1c24.2 33.3 53 63.1 86 89 47.6 37.3 101 64.2 158.9 79.9 55.9 15.2 113.5 19.3 171.2 12.3 57.7-7 112.7-24.7 163.3-52.8 52.5-29 98-67.9 135.3-115.4 37.3-47.6 64.2-101 79.9-158.9 10.2-37.6 15.4-76 15.6-114.6h-0.1c-0.3-11.6-5.5-23.1-15.5-30.9zM918.7 135.2h-3c-22.4 0-40.7 18.3-40.7 40.7V249c-24.2-33.3-53-63.1-86-89-47.6-37.3-101-64.2-158.9-79.9-55.9-15.2-113.5-19.3-171.2-12.3-57.7 7-112.7 24.7-163.3 52.8-52.5 29-98 67.9-135.3 115.4-37.3 47.5-64.2 101-79.9 158.8-10.2 37.6-15.4 76-15.6 114.6h0.1c0.2 11.7 5.5 23.2 15.4 30.9 17.5 13.7 42.8 10.7 56.6-6.8 5.7-7.3 8.5-15.8 8.6-24.4h0.4c0.6-78.3 26.1-157 78-223.3 124.9-159.2 356-187.1 515.2-62.3 31.7 24.9 58.2 54 79.3 85.9h-77.1c-22.4 0-40.7 18.3-40.7 40.7v3c0 22.4 18.3 40.7 40.7 40.7h177.3c22.4 0 40.7-18.3 40.7-40.7V175.8c0.1-22.3-18.2-40.6-40.6-40.6z" p-id="9058" fill="#898989"></path></svg>';
							html += '</div>';
							html += '</li>';
						})
						$(".material_articleList_container").html(html);
						$("#con").text(resp.data[1]);
					}
				})
			}else{
				myAjaxPost(false, true, 'authorizer_one.html', { title:title,authorizer_appid:appid}, function (resp) {
					if(resp.status == "success"){
						data = resp.data[0];
						console.log(resp);
						if(data == ""){
							alert("未搜索到");
							return false;
						}
						var html = "";
						var image = resp.data[2];
						data.forEach(function(text) {
							if(text.digest){
								var digest = text.digest;
							}else{
								digest = "";
							}
							if(!text.thumb_url){
								var thumb_url = image;
							}else{
								var thumb_url = text.thumb_url;
							}
							html += '<li>';
							html += '<div class="material_articleListInfo_container">';
							html += '<a href="'+text.url+'" target="_blank">';
							html += '<h3>'+text.title+'</h3>';
							html += '<div class="material_articleListInfo_content">';
							html += '<p>'+digest+'</p>';
							html += '<img src="'+thumb_url+'">';
							html += '</div>';
							html += '</a>';
							html += '</div>';
							html += '<div class="material_articleListOther_container">';
							html += '<span>最后同步时间：'+text.updates_time+'</span>';
							html += '<svg onclick="refreshMaterialFun('+text.media_id+')" t="1611652638004" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9057" width="19" height="19"><path d="M943.8 484.1c-17.5-13.7-42.8-10.7-56.6 6.8-5.7 7.3-8.5 15.8-8.6 24.4h-0.4c-0.6 78.3-26.1 157-78 223.3-124.9 159.2-356 187.1-515.2 62.3-31.7-24.9-58.2-54-79.3-85.9h77.1c22.4 0 40.7-18.3 40.7-40.7v-3c0-22.4-18.3-40.7-40.7-40.7H105.5c-22.4 0-40.7 18.3-40.7 40.7v177.3c0 22.4 18.3 40.7 40.7 40.7h3c22.4 0 40.7-18.3 40.7-40.7v-73.1c24.2 33.3 53 63.1 86 89 47.6 37.3 101 64.2 158.9 79.9 55.9 15.2 113.5 19.3 171.2 12.3 57.7-7 112.7-24.7 163.3-52.8 52.5-29 98-67.9 135.3-115.4 37.3-47.6 64.2-101 79.9-158.9 10.2-37.6 15.4-76 15.6-114.6h-0.1c-0.3-11.6-5.5-23.1-15.5-30.9zM918.7 135.2h-3c-22.4 0-40.7 18.3-40.7 40.7V249c-24.2-33.3-53-63.1-86-89-47.6-37.3-101-64.2-158.9-79.9-55.9-15.2-113.5-19.3-171.2-12.3-57.7 7-112.7 24.7-163.3 52.8-52.5 29-98 67.9-135.3 115.4-37.3 47.5-64.2 101-79.9 158.8-10.2 37.6-15.4 76-15.6 114.6h0.1c0.2 11.7 5.5 23.2 15.4 30.9 17.5 13.7 42.8 10.7 56.6-6.8 5.7-7.3 8.5-15.8 8.6-24.4h0.4c0.6-78.3 26.1-157 78-223.3 124.9-159.2 356-187.1 515.2-62.3 31.7 24.9 58.2 54 79.3 85.9h-77.1c-22.4 0-40.7 18.3-40.7 40.7v3c0 22.4 18.3 40.7 40.7 40.7h177.3c22.4 0 40.7-18.3 40.7-40.7V175.8c0.1-22.3-18.2-40.6-40.6-40.6z" p-id="9058" fill="#898989"></path></svg>';
							html += '</div>';
							html += '</li>';
						})
						$(".material_articleList_container").html(html);
						$("#con").text(resp.data[1]);

					}
				})
			}
		})
		// 点击每个素材的刷新按钮
		function refreshMaterialFun(e){
			myAjaxPost(false, true, 'synchronization_one.html', { media_id:e}, function (resp) {
				if(resp.status == "success"){
					layer.msg(resp.msg, function(){
						window.location.reload();
					});
				}else{
					tusi(resp.msg);
				}
			})
		}
		// 点击添加公众号 (弹出层)
		function popupSubscriptionFun(){
			layer.open({
			  type: 2,
			  title: '添加公众号',
			  shadeClose: true,
			  shade: 0.2,
			  area: ['405px', '400px'],
			  content: 'authorizer_lists.html',
			  end: function () {
                  window.location.href = "authorizer_list.html";
                }
			}); 
		}
	</script>
	<script type="text/javascript">
		function synchronization(){
			var url = window.location.search;
			var appid = $("#gzhSelect").val();
			if(url == ""){	
				myAjaxPost(false, true, 'synchronization.html', { }, function (resp) {
					if(resp.status == "success"){
						layer.msg(resp.msg, {
						    icon: 1,
						    time: 2000 //2秒关闭（如果不配置，默认是3秒）
						}, function(){
						   window.location.reload();
						}); 
					}else{
						alert(resp.msg);
					}
				})
			}else{
				myAjaxPost(false, true, 'synchronization.html', { authorizer_appid:appid}, function (resps) {
					if(resps.status == "success"){
						layer.msg(resps.msg, {
						    icon: 1,
						    time: 2000 //2秒关闭（如果不配置，默认是3秒）
						}, function(){
						   window.location.reload();
						}); 
					}else{
						alert(resps.msg);
					}
				})
			}
		}

	</script>
</body>
</html>